import request from '/@/utils/request';

/**
 * 登录api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */
export function useLoginApi() {
	return {
		captcha: (params?: object) => {
			return request({
				url: '/api/admin/captcha?t=' + Math.random(),
				method: 'get',
				params
			});
		},
		signIn: (data: object) => {
			return request({
				url: '/api/admin/login',
				method: 'post',
				data,
			});
		},
		signOut: (data: object) => {
			return request({
				url: '/api/admin/signOut',
				method: 'post',
				data,
			});
		}
	};
}
